#include "UDPClient.hpp"
using namespace client;

// ./UDPClient server_ip, server_port
int main(int argc, char** argv) {
    if (argc != 3) {
        UDPClient::usage(argv[0]);
        exit(USAGE_ERR);
    }

    string server_ip(argv[1]);
    uint16_t server_port = static_cast<uint16_t>(atoi(argv[2]));

    unique_ptr<UDPClient> udp_client(new UDPClient(server_ip, server_port));
    udp_client->initClient();
    udp_client->run();
    return 0;
}